import {action, observable, runInAction} from "mobx";
import {BaseResInterface, BaseResInterfaceWithData, sendGetRequest, sendPostRequest} from "../../../net";
import {StoreInterface} from "../../../net/instance/CommenModelInstance";
import {defaultObj} from "../../../util";



export class CompanyStore {
    @observable company:StoreInterface = defaultObj;


    @action.bound
    async getProfile(){
        const {data} = await sendGetRequest<BaseResInterfaceWithData<StoreInterface>>("main/getStoreProfile");
        runInAction(()=>{
            this.company = data;
        })
    }

}

const CompanyStoreInstance = new CompanyStore();
export default CompanyStoreInstance